<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        /*!*子孙后代选择器*!*/
        /*body div div p{color: red}!*p3 p4 p5：变红色*!*/
        /*body div div div p{color: yellow}!*p5：黄色*!*/

        /*子元素选择器，不包含后代*/
        body>div>div>p{color: blue}/*p3 p4 变绿*/

        /*为类选择器*/
        a:link{color: red}/*未访问转态*/
        a:visited{color: green}/*访问过转态*/
        a:hover{color: blue}/*悬停*/
        a:active{color: yellow}/*点击*/
    </style>
</head>
<body>
<a href="../day01/01文本相关.html">超链接1</a>
<a href="http://www.youku.com">超链接2</a>
<a href="http://www.qq.com">超链接3</a>
<!--最外层-->
<p>p1</p>
<div>
    <p>p2</p>
    <div><p>p3</p></div>
    <div>
        <p>p4</p>
        <div><p>p5</p></div>
    </div>
</div>
</body>
</html>